<template>
	<view class="my_search" :style="{'background-color':bgcolor}" @click="searchBpxHandler" 
	>
		<view class="search_box" :style="{'border-radius':radius+'px'}">
			<uni-icons type="search"></uni-icons>
			<text>搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		data() {
			return {
				
			};
		},
		props:{
			//背景颜色
			bgcolor:{
				type:String,
				// 默认颜色
				default:'#C00000'
			},
			// 圆角尺寸
			radius:{
				type:Number,
				// 默认尺寸
				default:18
			}
		},
		methods:{
			searchBpxHandler(){
				this.$emit('gotSearch')
			}
		}
	}
</script>

<style lang="scss">
.my_search{
	height: 50px;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0 10px;
	.search_box{
		background-color: #fff;
		width: 100%;
		height: 36px;
		display: flex;
		justify-content: center;
		align-items: center;
		text{
			font-size: 15px;
	
		}
	}
}
</style>